package com.principle.singleresponsibility;

public class SingleResponseibility3 {
    public static void main(String[] args) {
        Vehicle2 vehicle2 = new Vehicle2();
        vehicle2.runLand("摩托车");
        vehicle2.runWater("轮船");
        vehicle2.runAir("飞机");
    }
}

class Vehicle2 {
    public void runLand(String vehicle){
        System.out.println(vehicle + " 在公路上运行。。。。");
    }
    public void runAir(String vehicle){
        System.out.println(vehicle + " 在天空上运行。。。。");
    }
    public void runWater(String vehicle){
        System.out.println(vehicle + " 在水中运行。。。。");
    }
}
